package com.bupt.smart.network.api;

import com.bupt.smart.model.Goods;
import com.bupt.smart.model.Market;
import com.bupt.smart.model.recAddress;
import java.util.List;
import java.util.Map;


import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.Response;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Created by HH on 2016/7/5.
 */
public interface MarketAPI {
    @POST("mobile/test")
    Call<List<Market>> getMarketInfo();

    @POST("mobile/goods")
    Call<List<Goods>> getGoods(@Query("marketID") int marketID);

    @GET("mobile/{userid}/address")
    Call<List<recAddress>> getAddress(@Path("userid") int userid);

    @POST("mobile/address_add")
    Call<Map<String,Boolean>>editAddress(@Query("type")int type,@Body recAddress address);

    @GET("mobile/address_del")
    Call<Map<String,Boolean>>delAddress(@Query("userId")int userId,@Query("addressId") int addressId);
}
